﻿<html>
<meta http-equiv="content-type" content="text/html";charset="utf-8">
<head>
<title>测试各项功能</title>
</head>

<body>
<?php
function getmicrotime(){ 
    list($usec, $sec) = explode(" ",microtime()); 
    return ((float)$usec + (float)$sec); 
    } 

$time_start = getmicrotime();
    
for ($i=0; $i < 1000; $i++){
    //do nothing, 1000 times
    }

$time_end = getmicrotime();
echo $time_start."<br>";
print $time_start."\n";

echo $time_end."<br>";
$time = $time_end - $time_start;

echo "Did nothing in $time seconds";

$str = "编程"; 
if (preg_match("/^[\x{4e00}-\x{9fa5}]+$/u",$str)) { 
print("该字符串全部是中文"."<br>"); 
} else { 
print("该字符串不全部是中文"."<br>"); 
} 
?> 

<?php
$a="HS";

function printa(){
//global $a;
$a="HK";

print($a."<br>");

}
printa();

?>
</body>
</html>